import api from './index'
import request from "../utils/request";

export function queryUserList(belongTenement) {
  const data={
    tenementUsername:belongTenement,
    queryStr:''
  }
  return request({
    url: api.queryUserList,
    method: "post",
    data
  })
}

export function queryUserByKey(tenementUsername,queryStr){
  const data = {
    tenementUsername:tenementUsername,
    queryStr : queryStr
  }
  return request({
    url: api.queryUserByKey,
    method: "post",
    data
  })
}

export function createUser(data) {
  return request({
    url: api.createUser,
    method: "post",
    data
  })
}

export function modifyUserInfo(data) {
  return request({
    url: api.modifyUserInfo,
    method: "post",
    data
  })
}

export function removeUserByName(name){
  const data = {
    username: name
  }
  return request({
    url: api.removeUserByName,
    method: "post",
    data
  })
}
